package com.campus.counseling.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel("注册参数")
public class RegisterDTO {
    
    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty("用户名")
    private String username;

    @NotBlank(message = "密码不能为空")
    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("确认密码")
    private String confirmPassword;

    @NotBlank(message = "真实姓名不能为空")
    @ApiModelProperty("真实姓名")
    private String realName;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @ApiModelProperty("手机号")
    private String phone;

    @Email(message = "邮箱格式不正确")
    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("角色")
    private String role;

    @ApiModelProperty("状态")
    private String status;

    // 咨询师注册时的额外信息
    @ApiModelProperty("证书编号")
    private String certificateNo;

    @ApiModelProperty("证书图片URL")
    private String certificateUrl;

    @ApiModelProperty("从业年限")
    private Integer workYears;

    @ApiModelProperty("个人介绍")
    private String introduction;

    @ApiModelProperty(hidden = true)
    private Object certificate;  // 用于接收前端传来的证书信息，但不会被实际使用

    // 咨询师特有字段
    private String title;           // 职称
    @ApiModelProperty("专长领域")
    private String specialty;  // 改为 String 类型，因为前端会发送逗号分隔的字符串
    private String qualification;   // 资质证书

}